<?php /* Smarty version Smarty-3.1.18, created on 2017-07-22 21:32:41
         compiled from "/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/gm/order.edit.html" */ ?>
<?php /*%%SmartyHeaderCode:467241870597353f9b2a1b3-85049666%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a923789a2a6f8d3fee887d0513fefa03763da48e' => 
    array (
      0 => '/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/gm/order.edit.html',
      1 => 1478597406,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '467241870597353f9b2a1b3-85049666',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'row' => 0,
    'goods' => 0,
    'k' => 0,
    'rs' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_597353f9d74943_06754226',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_597353f9d74943_06754226')) {function content_597353f9d74943_06754226($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/Applications/MAMP/htdocs/PHP/jifenshop/framework/class/smarty-3.1.18/libs/plugins/modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<style type="text/css">
.profile-info-value{
	width: 34%;
}
</style>
<div class="page-header">
	<h6>
		订单管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			订单详情
		</small>
	</h6>
</div><!-- /.page-header -->

<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=order&act=edit" enctype="multipart/form-data" id="form">
	<input type="hidden" id="id" name="id" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" />
	<input type="hidden" id="oldstatus" name="oldstatus" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->status;?>
" />
	<input type="hidden" id="see" name="see" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->see;?>
" />
	<div class="profile-user-info profile-user-info-striped">
		<div class="profile-info-row">
				<div class="profile-info-name" style="background:none;"> </div>
				<div class="profile-info-value">
					<span><h4 style="text-align:right;">会员信息</h4></span>
				</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 下单人 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->member_name;?>
</span>
			</div>
			<div class="profile-info-name"> 下单人电话 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->mobile;?>
</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 下单时间 </div>
			<div class="profile-info-value">
				<span><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['row']->value->add_time,"%Y-%m-%d %H:%I:%S");?>
</span>
			</div>
		</div>
	</div>
	<div class="profile-user-info profile-user-info-striped">
		<div class="profile-info-row">
				<div class="profile-info-name" style="background:none;"> </div>
				<div class="profile-info-value">
					<span><h4 style="text-align:right;">订单信息</h4></span>
				</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> ID </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
</span>
			</div>
			<div class="profile-info-name"> 订单号 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->order_sn;?>
</span>
			</div>
		</div>
				<div class="profile-info-row">
			<div class="profile-info-name"> 支付时间 </div>
			<div class="profile-info-value">
				<span><?php if ($_smarty_tpl->tpl_vars['row']->value->pay_time) {?> <?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['row']->value->pay_time,"%Y-%m-%d %H:%I:%S");?>
<?php }?></span>
			</div>
			<div class="profile-info-name"> 使用佣金支付 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->used_commission;?>
</span>
			</div>
			
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 支付方式 </div>
			<div class="profile-info-value">
				<span><?php if ($_smarty_tpl->tpl_vars['row']->value->pay_method=='wxpay') {?>APP内微信支付 
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->pay_method=='wxpay_h5') {?>服务号内支付 
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->pay_method=='alipay') {?>支付宝支付
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->pay_method=='integral') {?>积分兑换<?php }?></span>
			</div>
			<div class="profile-info-name"> 使用余额支付 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->used_money;?>
</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 快递公司 </div>
			<div class="profile-info-value" style="vertical-align: middle;">
				<span>
					<input type="text" name="shipping_company" id="shipping_company" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->shipping_company;?>
" class="col-xs-3" style="width:122px;"/>
				</span>
			</div>
			<div class="profile-info-name"> 快递单号 </div>
			<div class="profile-info-value">
				<span><input type="text" name="shipping_number" id="shipping_number" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->shipping_number;?>
" class="col-xs-6" style="width:122px;"/></span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 使用优惠劵支付 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->used_coupon;?>
</span>
			</div>
			<div class="profile-info-name"> 状态 </div>
			<div class="profile-info-value">
				<span><select name="status" id="status" style="width:122px; onchange="show()"">
				<?php if ($_smarty_tpl->tpl_vars['row']->value->status>=0) {?>
				<option value="">请选择</option>
				<option value="0" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==0) {?>selected<?php }?>>未支付</option>
				<?php if ($_smarty_tpl->tpl_vars['row']->value->status==0) {?>
				<?php } else { ?>
				<option value="1" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==1) {?>selected<?php }?>>已支付</option>
				<option value="2" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==2) {?>selected<?php }?>>已发货</option>
				<option value="3" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==3) {?>selected<?php }?>>完成（已收货）</option>
				<option value="4" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==4) {?>selected<?php }?>>完成（已评价）</option>
				<?php }?>
				<option value="-1" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==-1) {?>selected<?php }?>>取消</option>
				<option value="-2" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==-2) {?>selected<?php }?>>退款</option>
				<option value="-3" <?php if ($_smarty_tpl->tpl_vars['row']->value->status==-2) {?>selected<?php }?>>退货</option>
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->status==-1) {?>
					<option value="-1" selected >取消</option>
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->status==-2) {?>
					<option value="-2" selected >退款</option>
				<?php } elseif ($_smarty_tpl->tpl_vars['row']->value->status==-3) {?>
					<option value="-3" selected >退款</option>
				<?php }?>
				</select></span>
				<input type="hidden" name="origin_status" id="origin_status" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->status;?>
" />
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 运费 </div>
			<div class="profile-info-value">
				<input type="text" name="shipping_price" id="shipping_price" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->shipping_price;?>
" class="col-xs-3" style="width:122px;"/>
			</div>
			<div class="profile-info-name"> <?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?>订单总积分<?php } else { ?>订单总价<?php }?> </div>
			<div class="profile-info-value">
				<input type="text" name="total_price" id="total_price" value="<?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?><?php echo intval($_smarty_tpl->tpl_vars['row']->value->total_price);?>
<?php } else { ?><?php echo $_smarty_tpl->tpl_vars['row']->value->total_price;?>
<?php }?>" class="col-xs-3" style="width:122px;"/><span style="line-height: 32px;padding-left: 10px;"> <?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?>积分<?php } else { ?>元<?php }?></span>
			</div>
			
		</div>
		<?php  $_smarty_tpl->tpl_vars['rs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['rs']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['goods']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['rs']->key => $_smarty_tpl->tpl_vars['rs']->value) {
$_smarty_tpl->tpl_vars['rs']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['rs']->key;
?>
		<div>
			商品<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>

			<input type="hidden" name="goods[]" id="goods<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value->id;?>
" />
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 商品图 </div>
			<div class="profile-info-value">
				<span><img src="<?php echo $_smarty_tpl->tpl_vars['rs']->value->goods_pic;?>
" style="width:100px;"></span>
			</div>
			<div class="profile-info-name"> 商品名称 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['rs']->value->goods_name;?>
</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 商品规格 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['rs']->value->spec;?>
</span>
			</div>
			<div class="profile-info-name"> <?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?>商品积分<?php } else { ?>商品单价<?php }?> </div>
			<div class="profile-info-value">
				<input type="text" name="price[]" id="price<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" value="<?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?><?php echo intval($_smarty_tpl->tpl_vars['rs']->value->price);?>
<?php } else { ?><?php echo $_smarty_tpl->tpl_vars['rs']->value->price;?>
<?php }?>" class="col-xs-3 price" onchange="onCh()" style="width:122px;"/><span style="line-height: 32px;padding-left: 10px;"> <?php if ($_smarty_tpl->tpl_vars['row']->value->integral_order==1) {?>积分<?php } else { ?>元<?php }?></span>
				<input type="hidden" name="" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value->quantity;?>
" class="quantity">
				<input type="hidden" name="" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value->price;?>
" class="tol">
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 商品数量 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['rs']->value->quantity;?>
</span>
			</div>
			<div class="profile-info-name"> 门店 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['rs']->value->shop_name;?>
</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 评价星级： </div>
			<div class="profile-info-value">
				<span>
					<?php if ($_smarty_tpl->tpl_vars['rs']->value->comment_content) {?> 
						<?php echo $_smarty_tpl->tpl_vars['rs']->value->comment_stars;?>
星 &nbsp;&nbsp;&nbsp;&nbsp; 评论时间：<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['rs']->value->comment_time,"%Y-%m-%d %H:%I:%S");?>
 
					<?php }?>
				</span>
			</div>
			<div class="profile-info-name"> 评价内容 </div>
			<div class="profile-info-value">
				<textarea name="comment_content" id="comment_content" rows="3" style="width:100%" disabled><?php echo $_smarty_tpl->tpl_vars['rs']->value->comment_content;?>
</textarea>
			</div>
		</div>
		<?php }
if (!$_smarty_tpl->tpl_vars['rs']->_loop) {
?>
		<?php } ?>
	</div>
	<div class="profile-user-info profile-user-info-striped">
		<div class="profile-info-row">
				<div class="profile-info-name" style="background:none;"> </div>
				<div class="profile-info-value">
					<span><h4 style="text-align:right;">收货信息</h4></span>
				</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 收货人姓名 </div>
			<div class="profile-info-value" >
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->name;?>
</span>
			</div>
			<div class="profile-info-name"> 邮政编码 </div>
			<div class="profile-info-value">
				<span><?php echo $_smarty_tpl->tpl_vars['row']->value->zipcode;?>
</span>
			</div>
		</div>
		<div class="profile-info-row">
			<div class="profile-info-name"> 地区 </div>
			<div class="profile-info-value" style="vertical-align: middle;">
				<span>
					<?php echo $_smarty_tpl->tpl_vars['row']->value->province;?>
<?php echo $_smarty_tpl->tpl_vars['row']->value->city;?>
<?php echo $_smarty_tpl->tpl_vars['row']->value->district;?>

				</span>
			</div>
			<div class="profile-info-name"> 地址 </div>
			<div class="profile-info-value">
				<span><input type="text" name="address" id="address" value="<?php echo $_smarty_tpl->tpl_vars['row']->value->address;?>
" class="col-xs-6" style="width:100%;"/></span>
			</div>
		</div>
	</div>
	<input type="hidden" name="print" id="print" value="" />
	<div class="clearfix form-actions">
		<div class="col-md-offset-3 col-md-9">
			<button class="btn btn-info" type="submit">
				<i class="ace-icon fa fa-check bigger-110"></i>
				提交
			</button>

			&nbsp; &nbsp; &nbsp;
			<button class="btn" type="reset">
				<i class="ace-icon fa fa-undo bigger-110"></i>
				重置
			</button>

			&nbsp; &nbsp; &nbsp;
			<button class="btn btn-info" type="button" onclick="javascript:history.go(-1)">
				<i class="ace-icon fa fa-check bigger-110"></i>
				返回
			</button>
			&nbsp; &nbsp; &nbsp;
			<button class="btn"  id="sub" >
				<i class="ace-icon fa fa-print bigger-120"></i>
				打印发货单
			</button>
		</div>
	</div>
	</form>
</div>
</div>

<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<script type="text/javascript">
$(function(){
	function add(){
		var all = 0;
		$('.tol').each(function(){
			var cc = 0;
			var cc = parseFloat($(this).val());
			all = all+cc;
		});
		$('#total_price').val(all);
}
	$(".price").blur(function(){
		var a = $(this).val();
		var b = $(this).siblings('.quantity').val();
		var c =a*b;
		$(this).siblings('.tol').val(c);
		add();
	})
})

	$(function(){

		$('#sub').click(function(){
			$('#print').attr('value','1');
			$('#form').submit();
		});
		$('#status').click(function(){
			var x=document.getElementById('status').value;
			if(x > 0){
				$('#sub').show();
			}else{
				$('#sub').hide();
			}
		})
		if(<?php echo $_smarty_tpl->tpl_vars['row']->value->status;?>
 > 0){
			$('#sub').show();
		}else{
			$('#sub').hide();
		}


	})
</script>
<?php }} ?>
